<%@ page language="java" import="java.util.*,com.maizhi.util.uploadUtil,com.maizhi.model.Files" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>文件上传</title>
    
    <style type="text/css">
    
    .list{background-color:#004080;}
    
    .list th{background-color:#004080;color:#ffffff;font-weight:600;}
    
    .list td{background-color:#fff;}
    
    html body{margin:0px; overflow:hidden;}
    
    </style>
  </head>
  
  <body>
  	<table width=100% height="100%">
  	
  	<tr>
  		<td width="300" valign="top">
  			
  			<table width="100%" class="list" cellspacing=1>
		    	<tr><th>休假模板下载</th></tr>
		    	<tr><td><a href="<%=basePath%>uploadController.do?down&id=201310111450175017">休假情况模板.xlsx</a></td></tr>
		    	<tr><td><a href="<%=basePath%>uploadController.do?down&id=20131014090827827">休假情况模板.xls</a></td></tr>
		    </table>
		    
  			<!-- upload.jsp?op=1 -->
		    <table width="100%" class="list" cellspacing=1>
		    
		       <tr><th colspan=2>休假数据上传</th></tr>
		    	
		       <tr>
		       <td colspan=2>
		       	<form action="<%=path%>/uploadController.do?upload&retrunPath=hr/hr_xj_file" enctype="multipart/form-data"  method="post">
		    	文件<input type="file" name="file">
		    	<input type="submit" value=" 上 传 "/>	
		    	</form>
		       </td>
		       </tr>
		    
		       <tr><th>属性</th>
	    		<th>值</th>
	    	  </tr>
	    	
	    	
	    	<c:forEach items="${list}" var="file">
	    		<tr><td>文件名</td><td>${file.fileName}</td></tr>
	    		<tr><td>保存名</td><td>${file.fileName}</td></tr>
	    		<tr><td>保存路径</td><td>${file.filePath}</td></tr>
	    		<tr><td>上传时间</td><td><fmt:formatDate value="${file.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td></tr>
	    	</c:forEach>
		    </table>
		</td>
    
    
  		<td valign="top">
  			<iframe src="<%=path%>/uploadController.do?filesList" width="100%" height="100%" frameborder=0></iframe>
  		</td> 
  	</tr>
  	</table>
    
  </body>
</html>
